﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace estiglp1112_5946_csharp
{
    class Teacher
    {
        public string Cod{set; get;}
        public string Name { set; get; }
        public string Degree { set; get; }
        public string Curse { set; get; }
        public string Catgory { set; get; }
        public string Regime { set; get; }
        public string Year { set; get; }
        public string TypeEstablishment { set; get; }
        public string Establishment { set; get; }

        public Teacher(string Cod,
            string Name,
            string Degree,
            string Curse,
            string Catgory,
            string Regime,
            string Year, 
            string TypeEstablishment, 
            string Establishment ) 
        {
            this.Cod = Cod.Replace("'","''");
            this.Name = Name.Replace("'", "''");
            this.Degree = Degree.Replace("'", "''");
            this.Curse = Curse.Replace("'", "''");
            this.Catgory = Catgory.Replace("'", "''");
            this.Regime = Regime.Replace("'", "''");
            this.Year = Year.Replace("'", "''");
            this.TypeEstablishment = TypeEstablishment.Replace("'", "''");
            this.Establishment = Establishment.Replace("'", "''");
        }

        public override string ToString()
        {
            return (String.Format(@"'{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}'",
            this.Cod, this.Name, this.Degree, this.Curse, this.Catgory, this.Regime, this.Year, this.TypeEstablishment, this.Establishment));
        }
       
    }
}
